<!DOCTYPE html>
<html>
<head>
	<title>参数管理</title>
	<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">

			<div class="form-group col-md-8">
				<#if shiro.hasPermission("tea:teatreatise:dept")>
				<div class="col-sm-3">
					<select    v-model="p.deptId"  style="width:160px;"  class="form-control" >
						<option value="" selected>选择部门</option>
						<option v-for="(item,index) in dmoptions" :key="index"  :value='item.deptId'>{{item.name}}</option>
					</select>
				</div>
				</#if>
			<#if shiro.hasPermission("tea:teatreatise:username")>
				<div class=" col-sm-6" >
					<input style="width:140px;" type="text" class="form-control" v-model="p.username"  placeholder="教师姓名">
				</div>
		    </#if>
			</div>

	    <#if shiro.hasPermission("tea:teatreatise:btn")>
		<a class="btn btn-default" @click="query">查询</a>
        </#if>
		<#if shiro.hasPermission("tea:teatreatise:excel")>
		<a class="btn btn-primary" @click="excel"><i class=""></i>&nbsp;导出</a>
		</#if>
        <#if shiro.hasPermission("tea:teatreatise:add")>
		<a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
        </#if>
         <#if shiro.hasPermission("tea:teatreatise:edit")>
			<a class="btn btn-primary" @click="edit"><i class="fa fa-plus"></i>&nbsp;修改</a>
         </#if>
         <#if shiro.hasPermission("tea:teatreatise:del")>
			<a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
          </#if>


		</div>
		<table id="jqGrid"></table>
		<div id="jqGridPager"></div>
	</div>
	<div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
			<div class="form-group">
				<div class="col-sm-2 control-label">专著或教材名称</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="teaTreatise.name" placeholder="专著或教材名称"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">ISBN</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="teaTreatise.isbn" placeholder="ISBN"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">类别</div>
				<div class="col-sm-10">
					<select  v-model="teaTreatise.kindId"    class="form-control" >
						<option value="" selected>选择类别</option>
						<option v-for="(item,index) in kdoptions" :key="index"  :value='item.id' >{{item.value}}</option>
					</select>
				</div>
			</div>




			<div class="form-group">
				<div class="col-sm-2 control-label">出版社</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="teaTreatise.press" placeholder="出版社"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">出版时间</div>
				<div class="col-sm-10">
					<el-date-picker v-model="teaTreatise.time"
									type="year"
									value-format="yyyy"
									placeholder="出版时间"
					>
					</el-date-picker>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">佐证材料jpg</div>
				<div class="col-sm-10" id="upBox">
					<div id="inputBox">
						<input type="file" title="佐证材料" id="file" multiple accept="image/jpg,image/JPEG"/>
						佐证材料</div>
					<div id="imgBox">
					</div>
				</div>

			</div>

			<!--<div class="form-group">
				<div class="col-sm-2 control-label">佐证材料pdf</div>
				<div class="col-sm-10" id="upBox1">
					<div id="inputBox1">
						<input type="file" title="pdf佐证材料" id="file1"  accept="application/pdf"/>
						pdf佐证材料</div>
					<div id="imgBox1">
					</div>
				</div>

			</div>-->
			<div class="form-group">
				<div class="col-sm-2 control-label"></div>
				<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
</div>
<script src="${request.contextPath}/statics/js/modules/tea/teatreatise.js?_${.now?long}"></script>
<script type="text/javascript">

	imgUpload({
		inputId:'file', //input框id
		imgBox:'imgBox', //图片容器id
		upUrl:'${request.contextPath}/tea/teatreatise/fileUpload',  //提交地址
	})
</script>
</body>
</html>